import {
	http
} from '@/external/service/service.js'
import configService from '@/external/service/config.service.js';
export default class HomeApi {
	/**
	 * @param {type} params 
	 * 获取动态列表
	 */
	async getDynamicList(params) {
		let res = await http.post('/yjd/v1/dynamic/getDynamicList', params)
		return res.data
	}
	async publishDynamicApi(params) {
		let res = await http.post('/yjd/v1/dynamic/publishDynamic', params)
		return res.data
	}
	async reportApi(params) {
		let res = await http.post('/yjd/v1/dynamic/report', params)
		return res.data
	}

	async getCommentListApi(params) {
		let res = await http.post('/yjd/v1/dynamic/getCommentList', params)
		return res.data
	}
	async commentApi(params) {
		let res = await http.post('/yjd/v1/dynamic/comment', params)
		return res.data
	}
	async deleteCommentApi(params) {
		let res = await http.post('/yjd/v1/dynamic/deleteComment', params)
		return res.data
	}
	async deleteDynamicApi(params) {
		let res = await http.post('/yjd/v1/dynamic/deleteDynamic', params)
		return res.data
	}
	async likeApi(params) {
		let res = await http.post('/yjd/v1/dynamic/like', params)
		return res.data
	}
	async deleteLikeApi(params) {
		let res = await http.post('/yjd/v1/dynamic/deleteLike', params)
		return res.data
	}

	// 讣告列表
	async getListoBituaryApi(params) {
		let res = await http.post('/yjd/v1/obituary/getlist', params)
		return res.data
	}
	// 讣告查询
	async queryBituaryApi(params) {
		let res = await http.post('/yjd/v1/obituary/query', params)
		return res.data
	}
	// 讣告创建
	async createBituaryApi(params) {
		let res = await http.post('/yjd/v1/obituary/create', params)
		return res.data
	}
	// 讣告删除
	async deleteBituaryApi(params) {
		let res = await http.post('/yjd/v1/obituary/delete', params)
		return res.data
	}
	// 讣告修改
	async updateBituaryApi(params) {
		let res = await http.post('/yjd/v1/obituary/update', params)
		return res.data
	}
	// 讣告绑定
	async bindmemorialBituaryApi(params) {
		let res = await http.post('/yjd/v1/obituary/bindmemorial', params)
		return res.data
	}


	/*---------------------族谱----------------------*/
	//获取亲人基本信息
	async getKinsfolkInfo(params) {
		let res = await http.post('/yjd/v1/genealogy/getKinsfolkInfo', params)
		return res.data
	}

	//添加/编辑亲人
	async addKinsfolk(params) {
		let res = await http.post('/yjd/v1/genealogy/addKinsfolk', params)
		return res.data
	}

	//亲人列表
	async getKinsfolkList(genealogyId) {
		let res = await http.post('/yjd/v1/genealogy/getKinsfolkList?genealogyId=' + genealogyId)
		return res.data
	}

	//删除亲人
	async deleteKinsfolk(params) {
		let res = await http.post('/yjd/v1/genealogy/deleteKinsfolk', params)
		return res.data
	}

	//族谱列表
	async getGenealogyList(params) {
		let res = await http.post('/yjd/v1/genealogy/getGenealogyList', params)
		return res.data
	}

	//族谱信息
	async getGenealogyInfo(params) {
		let res = await http.post('/yjd/v1/genealogy/getGenealogyInfo', params)
		return res.data
	}

	//创建/修改族谱
	async createGenealogy(params) {
		let res = await http.post('/yjd/v1/genealogy/createGenealogy', params)
		return res.data
	}

	//删除族谱
	async deleteGenealogy(params) {
		let res = await http.post('/yjd/v1/genealogy/deleteGenealogy', params)
		return res.data
	}

	//退出族谱
	async quitAdministrators(genealogyId) {
		let res = await http.post('/yjd/v1/genealogy/quitAdministrators?genealogyId=' + genealogyId)
		return res.data
	}

	//族谱管理人员列表
	async getAdministratorsList(params) {
		let res = await http.post('/yjd/v1/genealogy/getAdministratorsList', params)
		return res.data
	}

	//删除族谱管理人员
	async deleteGenealogyAdministrators(params) {
		let res = await http.post('/yjd/v1/genealogy/deleteGenealogyAdministrators', params)
		return res.data
	}

	//邀请加入族谱管理人员
	async inviteJoinGenealogyAdministrators(params) {
		let res = await http.post('/yjd/v1/genealogy/inviteJoinGenealogyAdministrators', params)
		return res.data
	}

	/*---------------------族谱----------------------*/

	// 墓园
	// 创建墓园
	async createMemorialApi(params) {
		let res = await http.post('/yjd/v1/memorial/createMemorial', params)
		return res.data
	}
	// 删除墓园
	async deleteMemorialApi(params) {
		let res = await http.post('/yjd/v1/memorial/deleteMemorial', params)
		return res.data
	}
	// 墓园
	async getMemorialListApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialList', params)
		return res.data
	}
	// 墓园绑定列表
	async getMemorialListToObituaryApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialListToObituary', params)
		return res.data
	}
	// 添加照片
	async addPhotoApi(params) {
		let res = await http.post('/yjd/v1/memorial/addPhoto', params)
		return res.data
	}
	// 照片列表
	async getPhotoListApi(params) {
		let res = await http.post('/yjd/v1/memorial/getPhotoList', params)
		return res.data
	}
	// 照片列表
	async deletePhotoApi(params) {
		let res = await http.post('/yjd/v1/memorial/deletePhoto', params)
		return res.data
	}
	// 添加视频
	async addVideoApi(params) {
		let res = await http.post('/yjd/v1/memorial/addVideo', params)
		return res.data
	}
	// 视频列表
	async getVideoListApi(params) {
		let res = await http.post('/yjd/v1/memorial/getVideoList', params)
		return res.data
	}
	// 删除视频
	async deleteVideoApi(params) {
		let res = await http.post('/yjd/v1/memorial/deleteVideo', params)
		return res.data
	}
	// 亲友团
	async getFamilyAndFriendListApi(params) {
		let res = await http.post('/yjd/v1/memorial/getFamilyAndFriendList', params)
		return res.data
	}
	// 推出亲友团
	async quitFFApi(params) {
		let res = await http.post('/yjd/v1/memorial/quitFF', params)
		return res.data
	}
	// 移出亲友团
	async removeFFApi(params) {
		let res = await http.post('/yjd/v1/memorial/removeFF', params)
		return res.data
	}
	// 管理员设置
	async setMemorialAdministratorsApi(params) {
		let res = await http.post('/yjd/v1/memorial/setMemorialAdministrators', params)
		return res.data
	}
	// 获取留言
	async getMemorialMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialMessageBoard', params)
		return res.data
	}
	// 发送留言
	async memorialMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/memorial/memorialMessageBoard', params)
		return res.data
	}
	// 删除留言
	async deleteMemorialMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/memorial/deleteMemorialMessageBoard', params)
		return res.data
	}
	// 留言点赞
	async likeMemorialMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/memorial/likeMemorialMessageBoard', params)
		return res.data
	}
	// 修改墓园(安息地)
	async modifyCemeteryApi(params) {
		let res = await http.post('/yjd/v1/memorial/modifyCemetery', params)
		return res.data
	}
	//获取真实墓园信息
	async getCemeteryReal(params) {
		let res = await http.post('/yjd/v1/memorial/getCemeteryReal', params)
		return res.data
	}
	// 修改生平简介
	async modifySummarizedApi(params) {
		let res = await http.post('/yjd/v1/memorial/modifySummarized', params)
		return res.data
	}
	// 生平(获取墓园基本信息)
	async getMemorialBaseInfoApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialBaseInfo', params)
		return res.data
	}
	// 获取墓园信息
	async getMemorialInfoApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialInfo', params)
		return res.data
	}
	// 点亮蜡烛
	async lightCandleApi(params) {
		let res = await http.post('/yjd/v1/memorial/lightCandle', params)
		return res.data
	}
	// 除草
	// ActionType  int64 `form:"actiontype"` //1:磕头2:擦墓碑3:除草
	async weedApi(params) {
		let res = await http.post('/yjd/v1/memorial/weed', params)
		return res.data
	}
	// 获取墓园供奉记录
	async getMemorialConsecrateRecordApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialConsecrateRecord', params)
		return res.data
	}
	/**
	 * 获取墓园祭品列表
	 * @param {Object} params `form:"memorialId"` //纪念馆ID
	 */
	async getCemeteryOffered(params) {
		let res = await http.post('/yjd/v1/memorial/getCemeteryOffered', params)
		return res.data
	}
	// 修改墓园
	async modifyCemeteryApi(params) {
		let res = await http.post('/yjd/v1/memorial/modifyCemetery', params)
		return res.data
	}
	// 邀请加入亲友团
	async invitationJoinFFApi(params) {
		let res = await http.post('/yjd/v1/memorial/invitationJoinFF', params)
		return res.data
	}

	// 修改墓园背景(未做)
	async modifyCemeteryBgApi(params) {
		let res = await http.post('/yjd/v1/memorial/modifyCemeteryBg', params)
		return res.data
	}
	// 修改墓园背景(未做)
	async modifyMemorialBgApi(params) {
		let res = await http.post('/yjd/v1/memorial/modifyMemorialBg', params)
		return res.data
	}
	// 修改背景音乐(未做)
	async modifyMusicBgApi(params) {
		let res = await http.post('/yjd/v1/memorial/modifyMusicBg', params)
		return res.data
	}

	// 创建追思会
	async createMemorialServiceApi(params) {
		let res = await http.post('/yjd/v1/memorial/createMemorialService', params)
		return res.data
	}
	// 获取追思会相关信息
	async getMemorialServiceInfoApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialServiceInfo', params)
		return res.data
	}

	// 获取追思会列表
	async getMemorialServiceListApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialServiceList', params)
		return res.data
	}
	// 删除追思会
	async deleteMemorialServiceApi(params) {
		let res = await http.post('/yjd/v1/memorial/deleteMemorialService', params)
		return res.data
	}

	// 获取墓园相关信息
	async getMemorialCemeteryInfoApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialCemeteryInfo', params)
		return res.data
	}
	
	//获取墓园装修记录
	async getCemeteryRenovateRecord(params) {
		let res = await http.post('/yjd/v1/memorial/getCemeteryRenovateRecord ', params)
		return res.data
	}
	
	/**
	 * 获取生平简介
	 * @param {Object} params memorialId
	 */
	async getMemorialSummarized(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialSummarized ', params)
		return res.data
	}

	
	
	

	// --------------------------------------祠堂START-----------------------------------
	// 根据祠堂ID获取祠堂基础信息
	async getHallBaseInfoApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallBaseInfo', params)
		return res.data
	}
	// 创建祠堂
	async createHallApi(params) {
		let res = await http.post('/yjd/v1/hall/createHall', params)
		return res.data
	}
	// 祠堂列表
	async getHallListApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallList', params)
		return res.data
	}
	// 祠堂墓园列表
	async getMemorialListToHallTabletApi(params) {
		let res = await http.post('/yjd/v1/memorial/getMemorialListToHallTablet', params)
		return res.data
	}
	// 传记列表
	async getHallLifeListApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallLifeList', params)
		return res.data
	}
	// 添加传记
	async addHallLifeApi(params) {
		let res = await http.post('/yjd/v1/hall/addHallLife', params)
		return res.data
	}
	// 删除传记
	async deleteHallLifeApi(params) {
		let res = await http.post('/yjd/v1/hall/deleteHallLife', params)
		return res.data
	}
	// 删除祠堂
	async deleteHallApi(params) {
		let res = await http.post('/yjd/v1/hall/deleteHall', params)
		return res.data
	}
	// 祠堂亲友团
	async getHallMemberListApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallMemberList', params)
		return res.data
	}
	// 祠堂设置管理员
	async setHallAdminApi(params) {
		let res = await http.post('/yjd/v1/hall/setHallAdmin', params)
		return res.data
	}
	// 移除祠堂
	async removeHallMemberApi(params) {
		let res = await http.post('/yjd/v1/hall/removeHallMember', params)
		return res.data
	}
	// 退出祠堂
	async quitHallMemberApi(params) {
		let res = await http.post('/yjd/v1/hall/quitHallMember', params)
		return res.data
	}
	// 祠堂视频列表
	async getHallVideoListApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallVideoList', params)
		return res.data
	}
	// 添加祠堂视频
	async addHallVideoApi(params) {
		let res = await http.post('/yjd/v1/hall/addHallVideo', params)
		return res.data
	}
	// 删除祠堂视频
	async deleteHallVideoApi(params) {
		let res = await http.post('/yjd/v1/hall/deleteHallVideo', params)
		return res.data
	}
	// 祠堂照片列表
	async getHallPhotoListApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallPhotoList', params)
		return res.data
	}
	// 添加祠堂照片
	async addHallPhotoApi(params) {
		let res = await http.post('/yjd/v1/hall/addHallPhoto', params)
		return res.data
	}
	// 删除祠堂照片列表
	async deleteHallPhotoApi(params) {
		let res = await http.post('/yjd/v1/hall/deleteHallPhoto', params)
		return res.data
	}
	// 修改祠堂位置
	async modifyHallPosApi(params) {
		let res = await http.post('/yjd/v1/hall/modifyHallPos', params)
		return res.data
	}
	// 获取祠堂牌位
	async getTabletListApi(params) {
		let res = await http.post('/yjd/v1/hall/getTabletList', params)
		return res.data
	}
	// 创建/修改牌位
	async createTabletApi(params) {
		let res = await http.post('/yjd/v1/hall/createTablet', params)
		return res.data
	}
	// 删除牌位
	async deleteTabletApi(params) {
		let res = await http.post('/yjd/v1/hall/deleteTablet', params)
		return res.data
	}
	// 祠堂留言列表
	async getHallMessageBoardListApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallMessageBoardList', params)
		return res.data
	}
	// 祠堂留言
	async hallMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/hall/hallMessageBoard', params)
		return res.data
	}
	// 给祠堂留言点赞/取消点赞
	async likeHallMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/hall/likeHallMessageBoard', params)
		return res.data
	}
	// 删除祠堂留言
	async deleteHallMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/hall/deleteHallMessageBoard', params)
		return res.data
	}
	// 祠堂邀请加入亲友团
	async inviteHallJoinApi(params) {
		let res = await http.post('/yjd/v1/hall/inviteHallJoin', params)
		return res.data
	}
	// 牌位绑定墓园
	async tabletbindmemorialApi(params) {
		let res = await http.post('/yjd/v1/hall/tabletbindmemorial', params)
		return res.data
	}
	// 祠堂详情
	async getHallInfoApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallInfo', params)
		return res.data
	}
	// 祠堂供奉记录
	async getHallConsecrateRecordApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallConsecrateRecord', params)
		return res.data
	}
	// 祠堂行礼(未做)
	async saluteHallApi(params) {
		let res = await http.post('/yjd/v1/hall/saluteHall', params)
		return res.data
	}
	// 祠堂添加香油(未做)
	async oilHallApi(params) {
		let res = await http.post('/yjd/v1/hall/oilHall', params)
		return res.data
	}
	// 祠堂装修材料列表
	async getHallMaterialListApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallMaterialList', params)
		return res.data
	}
	// 祠堂装修材料列表我的
	async getHallMaterialOwnedListApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallMaterialOwnedList', params)
		return res.data
	}
	// 购买祠堂装修
	async buyHallMaterialApi(params) {
		let res = await http.post('/yjd/v1/hall/buyHallMaterial', params)
		return res.data
	}
	// 装修祠堂
	async renovateHallApi(params) {
		let res = await http.post('/yjd/v1/hall/renovateHall', params)
		return res.data
	}
	// 装修记录(未做完 返回类型字段)
	async getHallRenovateRecordApi(params) {
		let res = await http.post('/yjd/v1/hall/getHallRenovateRecord', params)
		return res.data
	}

	// 新增留言
	async addMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/personal/addMessageBoard', params)
		return res.data
	}
	// 给留言点赞/取消点赞
	async likeMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/personal/likeMessageBoard', params)
		return res.data
	}
	// 删除留言
	async deleteMessageBoardApi(params) {
		let res = await http.post('/yjd/v1/personal/deleteMessageBoard', params)
		return res.data
	}
	// 获取留言列表
	async getMessageBoardListApi(params) {
		let res = await http.post('/yjd/v1/personal/getMessageBoardList', params)
		return res.data
	}
	// 举报
	async reportApi_(params) {
		let res = await http.post('/yjd/v1/personal/report', params)
		return res.data
	}
	// 使用装修元素
	async useDecorationElementsApi(params) {
		let res = await http.post('/yjd/v1/personal/useDecorationElements', params)
		return res.data
	}
	// 获取所有装修元素
	async getDecorationListApi(params) {
		let res = await http.post('/yjd/v1/personal/getDecorationList', params)
		return res.data
	}
	// 购买装修元素
	async buyDecorationDecorationApi(params) {
		let res = await http.post('/yjd/v1/personal/buyDecorationDecoration', params)
		return res.data
	}
	// 获取个人装修购买列表（不包含已过期的）
	async getUserDecorationListApi(params) {
		let res = await http.post('/yjd/v1/personal/getUserDecorationList', params)
		return res.data
	}
	async getBannerList(params) {
		let res = await http.post('/yjd/v1/service/getBannerList', params)
		return res.data
	}
	async getNoticeList(params) {
		let res = await http.post('/yjd/v1/service/getNoticeList', params)
		return res.data
	}
	async praiseNotice(params) {
		let res = await http.post('/yjd/v1/service/praiseNotice', params)
		return res.data
	}
	async getScorllList(params) {
		let res = await http.post('/yjd/v1/service/getScorllList', params)
		return res.data
	}
	/**
	 * 获取香油列表
	 * @param {Object} params
	 */
	async getHallOilList(params) {
		let res = await http.post('/yjd/v1/hall/getHallOilList', params)
		return res.data
	}
	/**
	 * 祠堂添加香油
	 * @param {Object} params
	 */
	async oilHall(params) {
		let res = await http.post('/yjd/v1/hall/oilHall', params)
		return res.data
	}
	/**
	 * 祠堂行礼
	 * @param {Object} params
	 */
	async saluteHall(params) {
		let res = await http.post('/yjd/v1/hall/saluteHall', params)
		return res.data
	}
	/**
	 * 真实祠堂
	 * @param {Object} params
	 */
	async getRealHall(params) {
		let res = await http.post('/yjd/v1/hall/getRealHall', params)
		return res.data
	}
	
	
	/**
	 * 祠堂购买的祭品
	 * @param {Object} params
	 */
	async getHallOffered(params) {
		let res = await http.post('/yjd/v1/hall/getHallOffered', params)
		return res.data
	}
	 
	/**
	 * 移动牌位位置
	 * @param {Object} params
	 */
	async moveTablet(params) {
		let res = await http.post('/yjd/v1/hall/moveTablet', params)
		return res.data
	}
	
	/**
	 * 清空牌位信息
	 * @param {Object} params tabletId 牌位id
	 */
	async deleteTablet(params) {
		let res = await http.post('/yjd/v1/hall/deleteTablet', params)
		return res.data
	}
	// --------------------------------------祠堂END-----------------------------------

	/**
	 * 获取装修
	 * @param {Object} params belongingTo,options=1|2|3|4|5
	 */
	async getDecorationList(params) {
		let res = await http.post('/yjd/v1/personal/getDecorationList', params)
		return res.data
	}
	
	/**
	 * 购买装修
	 * @param {Object} params belongingTo,options=1|2|3|4|5
	 * 1:纪念馆，2:墓园，3:追思会，4:祭拜，5:祠堂
	 * "correspondingId"` //对应Id
	 * "decorationDecorationIds"` //装修元素Id
	 */
	async buyDecorationDecoration(params) {
		let res = await http.post('/yjd/v1/personal/buyDecorationDecoration', params)
		return res.data
	}
	
	/**
	 * 获取个人装修
	 * @param {Object} params belongingTo,options=1|2|3|4|5
	 * 1:纪念馆，2:墓园，3:追思会，4:祭拜，5:祠堂
	 * "correspondingId"` //对应Id
	 */
	async getUserDecorationList(params) {
		let res = await http.post('/yjd/v1/personal/getUserDecorationList', params)
		return res.data
	}
}